package meituan;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        int n,x,y;
        Scanner scanner=new Scanner(System.in);
        n=scanner.nextInt();
        x=scanner.nextInt();
        y=scanner.nextInt();
        String[] names=new String[n];
        int[] cnt=new int[n];
        scanner.nextLine();
        HashMap<String,Integer>map=new HashMap<>();
        int geCnt=0;
        for(int i=0;i<n;++i){
            String str=scanner.nextLine();
            String[] strs =str.split(" ");
            names[i]=strs[0];
            cnt[i]= Integer.parseInt(strs[1]);
//            System.out.println(names[i]+"   "+cnt[i]);
            if(map.containsKey(names[i])){
                map.put(names[i],map.get(names[i])+cnt[i]);
            }else{
                map.put(names[i],cnt[i]);
            }
        }
        for (Map.Entry<String, Integer> stringIntegerEntry : map.entrySet()) {
            int value = stringIntegerEntry.getValue();
            geCnt += (Math.ceil((double) value / y));
        }
        int ans= (int) Math.ceil((double) geCnt/x);
        System.out.println(ans);
    }
}
